
sudo modprobe rtutil7601Uap
sudo modprobe mt7601Uap
sudo modprobe rtnet7601Uap

sudo ifconfig ra0 down
sudo ifconfig ra0 up
sudo ifconfig ra0 192.168.42.1
 
sudo dhcpd ra0
sudo iptables -F

sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward "
sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
sudo iptables -A FORWARD -i wlan0 -o ra0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i ra0 -o wlan0 -j ACCEPT
sudo iptables -t nat -S
sudo iptables -S
sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"

sudo service isc-dhcp-server restart
